<template>
	<div class="identity">
    <div class="change-success-icon"></div>
    <div class="change-success-title">
      {{$t('message.submitIdentityConfirmSuccess')}}！
    </div>
    <div class="change-success-tip">
      {{ delayTime }}{{$t('message.backToIdentityConfirm')}}
    </div>
	</div>
</template>

<script>
export default {
  data () {
    return {
      delayTime: 3 // 跳转延迟时间
    }
  },
  methods: {
    // 跳转到身份信息页面
    toIdentity () {
      scrollTo(0, 485)
      this.delayTimer = setInterval(() => {
        if (this.delayTime <= 0) {
          clearInterval(this.delayTimer)
          this.$router.push({ path: '/personal/identity' })
        } else {
          this.delayTime -= 1
        }
      }, 1000)
    }
  },
  created () {
    this.toIdentity()
  }
}
</script>

<style scoped>
.identity {
  width: 800px;
  margin: 60px auto 0;
  padding-bottom: 100px;
}

.change-success {
  width: 480px;
  margin: 0 auto;
  padding: 60px 0;
}

.change-success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  background: url(../../../assets/images/icon_success.png) no-repeat center;
}

.change-success-title {
  height: 26px;
  line-height: 26px;
  font-size: 24px;
  color: #333;
  text-align: center;
  margin-top: 24px;
}

.change-success-tip {
  height: 20px;
  line-height: 20px;
  font-size: 14px;
  color: #747474;
  text-align: center;
  margin-top: 12px;
}
</style>
